for (var t = new Date(), a = [], e = [], n = [], i = [ "上午", "中午", "下午", "晚上", "全天" ], d = t.getFullYear(); d <= 2048; d++) a.push(d);

for (var o = 1; o <= 12; o++) e.push(o);

for (var s = 1; s <= 31; s++) n.push(s);

getApp();

Component({
    properties: {},
    data: {
        isHidden: !0,
        years: a,
        year: t.getFullYear(),
        months: e,
        month: 1,
        days: n,
        day: 1,
        timepoint: 2,
        timepoints: i,
        value: [ 0, 0, 0 ]
    },
    methods: {
        hide: function() {
            this.setData({
                isHidden: !0
            });
        },
        show: function() {
            this.setData({
                isHidden: !1
            });
        },
        _numnberOfDayInMoth: function(t, a) {
            return 2 == a ? t % 4 == 0 && t % 100 != 0 || t % 400 == 0 ? 29 : 28 : 1 == a || 3 == a || 5 == a || 7 == a || 8 == a || 10 == a || 12 == module ? 31 : 30;
        },
        _bindChange: function(t) {
            var a = t.detail.value, e = this.data.years[a[0]], n = this.data.months[a[1]], i = this.data.days[a[2]], d = a[3] + 1, o = 0;
            o = this._numnberOfDayInMoth(e, n);
            for (var s = [], r = 1; r <= o; r++) s.push(r);
            this.setData({
                year: e,
                month: n,
                day: i,
                days: s,
                timepoint: d,
                value: a
            });
        },
        _bindDateConfirmTap: function(t) {
            var a = this;
            setTimeout(function() {
                var t;
                t = a.data.month < 10 ? "0" + a.data.month : "" + a.data.month;
                var e;
                e = a.data.day < 10 ? "0" + a.data.day : "" + a.data.day;
                var n = a.data.year + "-" + t + "-" + e, d = t + "月" + e + "日", o = a.data.timepoint;
                a.triggerEvent("confirm", {
                    date: n,
                    dateCn: d,
                    time: o,
                    timeCn: i[o - 1]
                });
            }, 250);
        }
    },
    ready: function() {
        for (var a = t.getMonth(), e = t.getDate(), n = this._numnberOfDayInMoth(t.getFullYear(), a + 1), i = [], d = 1; d <= n; d++) i.push(d);
        this.setData({
            month: a + 1,
            day: e,
            value: [ 0, a, e - 1, 1 ],
            days: i
        });
    }
});